package com.syxd.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.syxd.common.service.impl.CrudServiceImpl;
import com.syxd.dao.SysRolePermissionDao;
import com.syxd.dto.SysRolePermissionDTO;
import com.syxd.entity.SysRolePermissionEntity;
import com.syxd.service.SysRolePermissionService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 *
 *
 * @author hr tecsmile@outlook.com
 * @since 1.0.0 2019-07-15
 */
@Service
@Transactional
public class SysRolePermissionServiceImpl extends CrudServiceImpl<SysRolePermissionDao, SysRolePermissionEntity, SysRolePermissionDTO> implements SysRolePermissionService {

    @Override
    public QueryWrapper<SysRolePermissionEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<SysRolePermissionEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}
